package com.zhuliwei.controller;

import com.zhuliwei.domain.ResponseResult;
import com.zhuliwei.service.UploadService;
import io.swagger.annotations.Api;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件上传接口控制层
 *
 * @author 朱力维
 * @time 2022/10/15 12:32
 **/
@RestController
@Api(tags="文件上传",description = "文件上传相关接口")
public class UploadController {

    @Resource
    private UploadService uploadService;

    @PostMapping("/upload")
    public ResponseResult uploadImg(MultipartFile img){
        return uploadService.uploadImg(img);
    }
}
